this._messageList.setDate(date);
}));
- // Whenever the menu is opened, select today
this.menu.connect('open-state-changed', Lang.bind(this, function(menu, isOpen) {
+ // Whenever the menu is opened, select today
if (isOpen) {
let now = new Date();
this._calendar.setDate(now);
this._date.setDate(now);
}
+ // Block notification banners while the menu is open
+ Main.messageTray.bannerBlocked = isOpen;
}));
// Fill up the first column
this._onStatusChanged(proxy.status);
}));
this._busy = false;
+ this._bannerBlocked = false;
this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) {
this._onStatusChanged(status);
}));
return this._notificationQueue.length;
},
+ set bannerBlocked(v) {
+ if (this._bannerBlocked == v)
+ return;
+ this._bannerBlocked = v;
+ this._updateState();
+ },
+
contains: function(source) {
return this._sources.has(source);
},
// _updateState() figures out what (if anything) needs to be done
// at the present time.
_updateState: function() {
+ this.actor.visible = !this._bannerBlocked;
+ if (this._bannerBlocked)
+ return;
+
// If our state changes caused _updateState to be called,
// just exit now to prevent reentrancy issues.
if (this._updatingState)